package model.pojo;

import java.text.Format;
import java.text.SimpleDateFormat;
import java.util.Date;

public class AcCustomer implements java.io.Serializable {

	private static final long serialVersionUID = 1L;

	public Format format = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
	public Date tempIm, tempEx, tempOrder;
	public Date tempDate;

	private boolean isSelect = false;
	private String customerId;
	private String customerName;
	private String agent;
	private String idnumber;
	private String phone;
	private Integer type;

	private String website;
	private String description;
	private String fax;
	private Double chietkhau;
	private String address;
	private String email;
	private Double limit_debt;
	private String mobile;

	// Company type 3 loai
	private String companyType1;
	private String companyType2;
	private String companyType3;

	// Bank 3 loai
	// Loai 1
	private String account1;
	private String bankName1;
	private String bankNumber1;
	private String owner1;
	// Loai 2
	private String account2;
	private String bankName2;
	private String bankNumber2;
	private String owner2;
	// Loai 3
	private String account3;
	private String bankName3;
	private String bankNumber3;
	private String owner3;

	private Integer taxID;

	private String responsibleName;
	private String responsibleMobile;
	private String transactionLatest = "";
	private Date ngaydangky=new Date();
	
	

	public Date getNgaydangky() {
		return ngaydangky;
	}

	public void setNgaydangky(Date ngaydangky) {
		this.ngaydangky = ngaydangky;
	}

	public AcCustomer() {
	}

	public AcCustomer(String customerId, String customerName) {
		this.customerId = customerId;
		this.customerName = customerName;
	}

	public AcCustomer(String customerId, String customerName, String agent,
			String idnumber, String phone, Integer type) {
		this.customerId = customerId;
		this.customerName = customerName;
		this.agent = agent;
		this.idnumber = idnumber;
		this.phone = phone;
		this.type = type;
	}

	public AcCustomer(boolean isSelect, String customerId, String customerName,
			String agent, String idnumber, String phone, Integer type,
			String website, String description, String fax, Double chietkhau,
			String address, String email, Double limit_debt) {
		this.isSelect = isSelect;
		this.customerId = customerId;
		this.customerName = customerName;
		this.agent = agent;
		this.idnumber = idnumber;
		this.phone = phone;
		this.type = type;
		this.website = website;
		this.description = description;
		this.fax = fax;
		this.chietkhau = chietkhau;
		this.address = address;
		this.email = email;
		this.limit_debt = limit_debt;
	}

	public AcCustomer(boolean isSelect, String customerId, String customerName,
			String agent, String idnumber, String phone, Integer type,
			String website, String description, String fax, Double chietkhau,
			String address, String email, Double limit_debt, String mobile,
			String companyType1, String companyType2, String companyType3,
			String account1, String account2, String account3, Integer taxID,
			String responsibleName, String responsibleMobile, String transactionLatest, Date ngaydangky) {
		this.isSelect = isSelect;
		this.customerId = customerId;
		this.customerName = customerName;
		this.agent = agent;
		this.idnumber = idnumber;
		this.phone = phone;
		this.type = type;
		this.website = website;
		this.description = description;
		this.fax = fax;
		this.chietkhau = chietkhau;
		this.address = address;
		this.email = email;
		this.limit_debt = limit_debt;
		this.mobile = mobile;
		this.companyType1 = companyType1;
		this.companyType2 = companyType2;
		this.companyType3 = companyType3;
		this.taxID = taxID;
		this.responsibleName = responsibleName;
		this.responsibleMobile = responsibleMobile;
		this.transactionLatest = transactionLatest;
		this.ngaydangky=ngaydangky;
		
		if (account1 != null && !account1.equals("")) {
			String temp1[] = account1.split(";");
			bankName1 = temp1[0];
			bankNumber1 = temp1[1];
			owner1 = temp1[2];
			this.account1 = account1;
		} else {
			this.account1 = "";
		}
		if (account2 != null && !account2.equals("")) {
			String temp2[] = account2.split(";");
			bankName2 = temp2[0];
			bankNumber2 = temp2[1];
			owner2 = temp2[2];
			this.account2 = account2;
		} else {
			this.account2 = "";
		}
		if (account3 != null && !account3.equals("")) {
			String temp3[] = account3.split(";");
			bankName3 = temp3[0];
			bankNumber3 = temp3[1];
			owner3 = temp3[2];
			this.account3 = account3;
		} else {
			this.account3 = "";
		}
	}

	public String getCustomerId() {
		return this.customerId;
	}

	public void setCustomerId(String customerId) {
		this.customerId = customerId;
	}

	public String getCustomerName() {
		return this.customerName;
	}

	public void setCustomerName(String customerName) {
		this.customerName = customerName;
	}

	public String getAgent() {
		return this.agent;
	}

	public void setAgent(String agent) {
		this.agent = agent;
	}

	public String getIdnumber() {
		return this.idnumber;
	}

	public void setIdnumber(String idnumber) {
		this.idnumber = idnumber;
	}

	public String getPhone() {
		return this.phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public Integer getType() {
		return this.type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public String getWebsite() {
		return website;
	}

	public void setWebsite(String website) {
		this.website = website;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getFax() {
		return fax;
	}

	public void setFax(String fax) {
		this.fax = fax;
	}

	public Double getChietkhau() {
		return chietkhau;
	}

	public void setChietkhau(Double chietkhau) {
		this.chietkhau = chietkhau;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Override
	public String toString() {
		return this.customerName;
	}

	public void setLimit_debt(Double limit_debt) {
		this.limit_debt = limit_debt;
	}

	public Double getLimit_debt() {
		return limit_debt;
	}

	public void setSelect(boolean isSelect) {
		this.isSelect = isSelect;
	}

	public boolean isSelect() {
		return isSelect;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getMobile() {
		return mobile;
	}

	public void setCompanyType1(String companyType1) {
		this.companyType1 = companyType1;
	}

	public String getCompanyType1() {
		return companyType1;
	}

	public void setCompanyType2(String companyType2) {
		this.companyType2 = companyType2;
	}

	public String getCompanyType2() {
		return companyType2;
	}

	public void setCompanyType3(String companyType3) {
		this.companyType3 = companyType3;
	}

	public String getCompanyType3() {
		return companyType3;
	}

	public String getAccount1() {
		return account1;
	}

	public void setAccount1(String account1) {
		this.account1 = account1;
	}

	public String getBankName1() {
		return bankName1;
	}

	public void setBankName1(String bankName1) {
		this.bankName1 = bankName1;
	}

	public String getBankNumber1() {
		return bankNumber1;
	}

	public void setBankNumber1(String bankNumber1) {
		this.bankNumber1 = bankNumber1;
	}

	public String getOwner1() {
		return owner1;
	}

	public void setOwner1(String owner1) {
		this.owner1 = owner1;
	}

	public String getAccount2() {
		return account2;
	}

	public void setAccount2(String account2) {
		this.account2 = account2;
	}

	public String getBankName2() {
		return bankName2;
	}

	public void setBankName2(String bankName2) {
		this.bankName2 = bankName2;
	}

	public String getBankNumber2() {
		return bankNumber2;
	}

	public void setBankNumber2(String bankNumber2) {
		this.bankNumber2 = bankNumber2;
	}

	public String getOwner2() {
		return owner2;
	}

	public void setOwner2(String owner2) {
		this.owner2 = owner2;
	}

	public String getAccount3() {
		return account3;
	}

	public void setAccount3(String account3) {
		this.account3 = account3;
	}

	public String getBankName3() {
		return bankName3;
	}

	public void setBankName3(String bankName3) {
		this.bankName3 = bankName3;
	}

	public String getBankNumber3() {
		return bankNumber3;
	}

	public void setBankNumber3(String bankNumber3) {
		this.bankNumber3 = bankNumber3;
	}

	public String getOwner3() {
		return owner3;
	}

	public void setOwner3(String owner3) {
		this.owner3 = owner3;
	}

	public void setTaxID(Integer taxID) {
		this.taxID = taxID;
	}

	public Integer getTaxID() {
		return taxID;
	}

	public void setResponsibleName(String responsibleName) {
		this.responsibleName = responsibleName;
	}

	public String getResponsibleName() {
		return responsibleName;
	}

	public void setResponsibleMobile(String responsibleMobile) {
		this.responsibleMobile = responsibleMobile;
	}

	public String getResponsibleMobile() {
		return responsibleMobile;
	}

	public void setTransactionLatest(String transactionLatest) {
		this.transactionLatest = transactionLatest;
	}

	public String getTransactionLatest() {
		return transactionLatest;
	}
}
